Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jobs): Add job to migrate analytics data from influx to postgres #230

Merged
merged 8 commits into from
Jan 20, 2025

Conversation

gagantrivedi
Copy link
Member

@gagantrivedi gagantrivedi commented Jun 6, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have bumped the version number in /charts/flagsmith/Chart.yaml in the section version or I'm merging to a
    release branch

Changes

Add a job to migrate analytics data from influx to postgres

How did you test this code?

Tested on existing cluster

@gagantrivedi gagantrivedi requested a review from a team as a code owner June 6, 2024 07:23
@gagantrivedi gagantrivedi requested review from khvn26 and removed request for a team June 6, 2024 07:23
@gagantrivedi gagantrivedi force-pushed the feat/jobs-migrate-analytics branch from d2f2542 to 39d1686 Compare June 6, 2024 07:23
Comment on lines 16 to 24
spec:
restartPolicy: Never
containers:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add:

  • extraContainers
  • extraVolumes
  • shareProcessNamespace
  • serviceAccountName

to support all kinds of database connectivity configurations

See jobs-migrate-db for an example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -52,6 +52,15 @@
name: {{ template "flagsmith.influxdb.fullname" . }}-external-auth
key: admin-token
{{- end }}
{{- else if .Values.UsePostgresForAnalytics.enabled }}
{{- if not .Values.taskProcessor.enabled }}
{{ fail "To use Postgre for analytics, the task processor must be enabled" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ fail "To use Postgre for analytics, the task processor must be enabled" }}
{{ fail "To use PostgreSQL for analytics, `taskProcessor.enabled` should be set to `true`" }}

######################################

InfluxDB2 is deprecated and will be removed in the next major version.
You can either use InfluxDBExternal or migrate your analytics data to PostgreSQL by using the migrateAnalyticsData job
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can either use InfluxDBExternal or migrate your analytics data to PostgreSQL by using the migrateAnalyticsData job
Please set values under the `influxdbExternal` key
or migrate your analytics data to PostgreSQL by enabling `jobs.migrateAnalytics`.

@gagantrivedi gagantrivedi force-pushed the feat/jobs-migrate-analytics branch 2 times, most recently from 37693b6 to 1f8d1f5 Compare July 8, 2024 04:24
@gagantrivedi gagantrivedi merged commit 5deacc0 into main Jan 20, 2025
1 check passed
@gagantrivedi gagantrivedi deleted the feat/jobs-migrate-analytics branch January 20, 2025 04:33
@khvn26 khvn26 mentioned this pull request Jan 20, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants